home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 22 / AACD 22.iso / AACD / Programming / RxMUI / Examples / cmurl.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  2001-05-24  |  2.0 KB  |  74 lines

  1. /* */
  2.  
  3. signal on halt
  4. signal on break_c
  5.  
  6. l="rmh.library";if ~show("L",l) then;if ~addlib(l,0,-30) then exit
  7. if AddLibrary("rxmui.library")~=0 then exit
  8.  
  9. call RxMUIOpt("debugmode showerr")
  10. call CreateApp
  11. call HandleApp
  12. /* never reached */
  13. /***********************************************************************/
  14. CreateApp: procedure
  15.  
  16.     app.Title="Choose an URL"
  17.     app.Version="$VER: ChooseURL 1.0 (23.09.2000)"
  18.     app.Copyright="©1999, alfie"
  19.     app.Author="alfie"
  20.     app.Description="Let you choose an URL"
  21.     app.Base="CURL"
  22.     app.SubWindow="win"
  23.      win.Title="Choose an URL"
  24.      win.Contents="mgroup"
  25.      win.ID="MAIN"
  26.       mgroup.0="pg"
  27.        pg.class="group"
  28.        pg.horiz=1
  29.         pg.0=label("_URL")
  30.         pg.1="pop"
  31.          pop.class="popobject"
  32.          pop.toggle=1
  33.          pop.string=string("url",'u')
  34.          pop.button=makeobj("","Imagebutton","Popup")
  35.          pop.object="cm"
  36.           cm.class="cm"
  37.           cm.frame="inputlist"
  38.           cm.HIDEUSERS=1
  39.           cm.HIDEWWW=0
  40.           cm.HIDEFTP=1
  41.           cm.HIDECHAT=1
  42.           cm.HIDETELNET=1
  43.           cm.DoubleClick="cmentry"
  44.  
  45.     res=NewObj("APPLICATION","APP")
  46.     if res~=0 then call err(res)
  47.  
  48.     call DoMethod("cm","LoadData")
  49.  
  50.     call Notify("win","closerequest",1,"app","returnid","quit")
  51.     call Notify("cm","doubleclick","everytime","pop","close",1)
  52.     call Notify("pop","success",1,"app","returnid")
  53.  
  54.     call set("win","open",1)
  55.  
  56.     return
  57. /***********************************************************************/
  58. HandleApp: procedure
  59.     do forever
  60.         call newhandle("APP","H",2**12)
  61.         if and(h.signals,2**12)>0 then exit
  62.         select
  63.             when h.event="QUIT" then exit
  64.             when h.event="POP" then call set("url","contents",cmentry.www)
  65.             otherwise nop
  66.         end
  67.     end
  68.     /* never reached */
  69. /***********************************************************************/
  70. halt:
  71. break_c:
  72.     exit
  73. /**************************************************************************/
  74.